<h1>Interface admin</h1>

<%= "#{I18n.t 'admin.dashboard.product_count'} : #{@product_count}" %><br />
<%= "#{I18n.t 'admin.dashboard.user_count'} : #{@user_count}" %><br />

<div id='last_news'>
  <h2><%= I18n.t 'admin.dashboard.news_title'%></h2>
  <ul>
  <% @news.each do |news| %>
    <li><%= "#{news.title} : #{truncate news.content, :length => 50}"%></li>
  <% end %>
  </ul>
  <%= link_to I18n.t("admin.dashboard.news_next"), :controller => "admin/news" %>
</div>

<div id='last_users'>
  <h2><%= I18n.t 'admin.dashboard.user_title'%></h2>
  <ul>
  <% @users.each do |user| %>
    <li><%= "#{user.firstname} #{user.lastname} ==> #{user.email}"%></li>
  <% end %>
  </ul>
  <%= link_to I18n.t("admin.dashboard.user_next"), :controller => "admin/users" %>
</div>